﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace DroidLord.app.dy
{
    class DYGetPopularGoods
    {

        /// <summary>
        /// https://lianmengapi.snssdk.com/ies/v2/discover/popular
        /// </summary>
        /// <returns></returns>
        public static String getPopularGoods()
        {
            String result = "";
            try
            {
                String myurl = "https://lianmengapi.snssdk.com/ies/v2/discover/popular";
                HttpWebRequest myrequest = (HttpWebRequest)WebRequest.Create(myurl);
                myrequest.Method = "GET";
                myrequest.AllowAutoRedirect = true;
                using (WebResponse wr = myrequest.GetResponse())
                {
                    StreamReader myStreamReader = new StreamReader(wr.GetResponseStream(), Encoding.GetEncoding("utf-8"));
                    result = myStreamReader.ReadToEnd();
                    myStreamReader.Close();
                }
                myrequest.Abort();
            }
            catch (Exception eee)
            {

            }
            return result;
        }
    }
}
